﻿using System.ComponentModel.DataAnnotations;

namespace SimpleFeedback.Models
{
    public class Feedback
    {
        public int Id { get; set; }
        public byte Rate { get; set; }
        [MaxLength(20)]
        public string? Title { get; set; }
        [MaxLength(1000)]
        public string? Content { get; set; }
        public DateTime Created { get; set; }
    }

    public class FeedbackViewModel(List<Feedback> feedbacks, int pageIdx)
    {
        public List<Feedback> Feedbacks { get; set; } = feedbacks;
        public int PageIdx { get; set; } = pageIdx;
    }
}
